package com.lagou.edu.mapper;

import com.lagou.edu.AuthCode;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

/**
 * @author
 */
@Repository
public interface AuthCodeMapper extends Mapper<AuthCode> {

    /**
     * 获取最新的验证码
     * @param email
     * @return
     */
    @Select("select * from lagou_auth_code where email = #{email} order by createtime desc limit 1")
    AuthCode selectAuthCode(@Param("email") String email);
}
